package com.citycloud.ccuap.tc.admin.entity;

import com.citycloud.ccuap.commons.db.LikeMatchMode;
import com.citycloud.ccuap.framework.service.Model;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mybatis.annotations.Column;
import org.springframework.data.mybatis.annotations.Condition;
import org.springframework.data.mybatis.annotations.Entity;
import org.springframework.data.mybatis.annotations.Id;
import org.springframework.data.repository.query.parser.Part;

import java.util.Date;

import static org.springframework.data.mybatis.annotations.Id.GenerationType.UUID;

/**
 * @Description 站点（项目）类型实体
 * @Date 2019/12/18 7:08 PM
 * @Author liuyan
 **/
@Data
@NoArgsConstructor
@Entity(table = "sys_project_type")
public class SysProjectType implements Model {

	private static final long serialVersionUID = 7614986021824328435L;
	/**
     * 唯一标识
     */
    @Id(strategy = UUID)
    @Column(name = "id")
    private String id;
    /**
     * 站点/项目类型名称
     */
    @Column(name = "name")
    @Condition(type = Part.Type.LIKE, likeMatchMode = LikeMatchMode.BOTHADD)
    private String name;
    /**
     * 站点/项目类型编码（唯一自动生成规则:project_type_UUID）
     */
    @Column(name = "code")
    @Condition
    private String code;
    /**
     * 站点/项目类型描述
     */
    @Column(name = "description")
    @Condition
    private String description;
    /**
     * 站点/项目类型图标
     */
    @Column(name = "icon")
    @Condition
    private String icon;
    /**
     * 排序字段
     */
    @Column(name = "seq")
    @Condition
    private Integer seq;
    /**
     * 创建者
     */
    @Column(name = "creator")
    @Condition
    private String creator;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @Condition
    private Date createTime;
    /**
     * 修改者
     */
    @Column(name = "updator")
    @Condition
    private String updator;
    /**
     * 修改时间
     */
    @Column(name = "update_time")
    @Condition
    private Date updateTime;


}
